package com.zhihao.zhihaopicturebackend.model.dto.user;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * @author Jackson
 * @create 2024/12/22 0:13
 * @description 用户修改密码请求
 */
@ApiModel(description = "用户修改密码请求")
@Data
public class UserPasswordModifyRequest {

    /**
     * 原密码
     */
    @ApiModelProperty(value = "密码(长度必须在8到20个字符之间)", required = true)
    @NotBlank(message = "密码不能为空")
    @Size(min = 8, max = 20, message = "密码长度必须在8-20个字符之间")
    private String userPassword;

    /**
     * 确认密码
     */
    @ApiModelProperty(value = "新密码(必须与密码保持一致)", required = true)
    @NotBlank(message = "新密码不能为空")
    @Size(min = 8, max = 20, message = "新密码长度必须在8-20个字符之间")
    private String newPassword;

    /**
     * 确认密码
     */
    @ApiModelProperty(value = "校验密码(必须与密码保持一致)", required = true)
    @NotBlank(message = "确认密码不能为空")
    @Size(min = 8, max = 20, message = "确认密码长度必须在8-20个字符之间")
    private String checkNewPassword;

    private static final long serialVersionUID = 3191241716373120793L;
}
